<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <?php
            session_start();
            if(isset($_POST['option']))
            {
                include("../Service/WebClass/timer/KeywordTimerService.php");

                $KeywordTimerService = new KeywordTimerService();
                $timerId = $KeywordTimerService->addTimer();
                if($timerId !== False)
                {
                    $message = "登録しました。";
                    echo "<script>alert(\"".$message."\");</script>";
                    echo "<script>self.location=\"KeywordTimerEdit.php?listingType=".$_GET['listingType']."&camp_Id=".$_GET['camp_Id']."&adGr_Id=".$_GET['adGr_Id']."&key_Id=".$_GET['key_Id']."&timerId=$timerId\";</script>";
                }
                else
                {
                    $message = "登録失敗しました。";
                    echo "<script language='javascript'>alert(\"".$message."\");</script>";
                }
            }
        ?>
        <title>タイマー新規</title>
        <link rel="stylesheet" href="../css/common.css" type="text/css" />
        <script language="JavaScript" src="../js/common.js" type="text/javascript"></script>
        <script language="JavaScript" src="../js/InputCheck.js" type="text/javascript"></script>
        <script language="JavaScript" src="../js/Calendar4.js" type="text/javascript"></script>
        <meta http-equiv="Pragma" content="cache">
        <meta http-equiv="Cache-Control" content="cache">

    </head><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="logo" id="topmenu">
            <tr>
                <td width="200" valign="top">&nbsp;</td>
                <td align="right" valign="top">
                    <br>
                    <input type="button" class="btn close" onClick="self.close();">
                </td>
            </tr>
        </table>
        <br><br>
        <form name="inputform" method="post">
            <input type="hidden" name="option" value="new"/>
            <div>
                <table border="0" cellpadding="2" cellspacing="0" width="100%">
                    <tbody>
                        <tr>
                            <td align="right"><input class="btn save" value="" type="submit" onclick="return keyword_timer_check()"></td>
                        </tr>
                    </tbody>
                </table>
                <table class="tbl" border="0" cellpadding="4" cellspacing="0" width="100%">
                    <tbody>
                        <tr>
                            <td class="td9 top" align="left" width="200">
                                タイマー実行
                            </td>
                            <td class="td4 border">
                                <input name="timerFlg" id="timer_status1" value="1" checked="checked" type="radio"><label for="timer_status1">オン</label>

                                <input name="timerFlg" id="timer_status0" value="0" type="radio"><label for="timer_status0">オフ</label>
                            </td>
                        </tr>
                        <tr>
                            <td class="td9 top" align="left">日時</td>
                            <td class="td4 border">
                                <input name="timerType" id="timer_type1" value="0" checked="checked" type="radio">
                                <label for="timer_type1">毎日</label>&nbsp;&nbsp;

                                <select name="timerTime0" class="txBox">
                                    <option value="0" selected="selected">00時
                                    </option><option value="1">01時
                                    </option><option value="2">02時
                                    </option><option value="3">03時
                                    </option><option value="4">04時
                                    </option><option value="5">05時
                                    </option><option value="6">06時
                                    </option><option value="7">07時
                                    </option><option value="8">08時
                                    </option><option value="9">09時
                                    </option><option value="10">10時
                                    </option><option value="11">11時
                                    </option><option value="12">12時
                                    </option><option value="13">13時
                                    </option><option value="14">14時
                                    </option><option value="15">15時
                                    </option><option value="16">16時
                                    </option><option value="17">17時
                                    </option><option value="18">18時
                                    </option><option value="19">19時
                                    </option><option value="20">20時
                                    </option><option value="21">21時
                                    </option><option value="22">22時
                                    </option><option value="23">23時
                                </option></select>

                                <br><br>
                                <input name="timerType" id="timer_type2" value="1" type="radio">
                                <label for="timer_type2">毎週</label>&nbsp;&nbsp;
                                <input name="Sun" value="1" id="week_1" type="checkbox"><label for="week_1">日</label>
                                <input name="Mon" value="2" id="week_2" type="checkbox"><label for="week_2">月</label>
                                <input name="Tue" value="3" id="week_3" type="checkbox"><label for="week_3">火</label>

                                <input name="Wed" value="4" id="week_4" type="checkbox"><label for="week_4">水</label>
                                <input name="Thu" value="5" id="week_5" type="checkbox"><label for="week_5">木</label>
                                <input name="Fri" value="6" id="week_6" type="checkbox"><label for="week_6">金</label>
                                <input name="Sat" value="7" id="week_7" type="checkbox"><label for="week_7">土</label>
                                &nbsp;
                                <select name="timerTime1" class="txBox">
                                    <option value="0" selected="selected">00時
                                    </option><option value="1">01時
                                    </option><option value="2">02時
                                    </option><option value="3">03時
                                    </option><option value="4">04時
                                    </option><option value="5">05時
                                    </option><option value="6">06時
                                    </option><option value="7">07時
                                    </option><option value="8">08時
                                    </option><option value="9">09時
                                    </option><option value="10">10時
                                    </option><option value="11">11時
                                    </option><option value="12">12時
                                    </option><option value="13">13時
                                    </option><option value="14">14時
                                    </option><option value="15">15時
                                    </option><option value="16">16時
                                    </option><option value="17">17時
                                    </option><option value="18">18時
                                    </option><option value="19">19時
                                    </option><option value="20">20時
                                    </option><option value="21">21時
                                    </option><option value="22">22時
                                    </option><option value="23">23時
                                </option></select>


                                <br><br>
                                <input name="timerType" id="timer_type3" value="2" type="radio">
                                <label for="timer_type3">一回</label>&nbsp;&nbsp;
                                <input name="timerDate" id="timer_type3_day" value="" class="txBox" style="width: 65px;" type="text">
                                <a href="javascript:void(0)">
                                <img name="popcal2" align="top" src="../images/cal.gif" border="0" alt="calendar" onclick="MyCalendar.SetDate(this,document.getElementById('timer_type3_day'))"></a>&nbsp;
                                <select name="timerTime2" class="txBox">
                                    <option value="0" selected="selected">00時
                                    </option><option value="1">01時
                                    </option><option value="2">02時
                                    </option><option value="3">03時
                                    </option><option value="4">04時
                                    </option><option value="5">05時
                                    </option><option value="6">06時
                                    </option><option value="7">07時
                                    </option><option value="8">08時
                                    </option><option value="9">09時
                                    </option><option value="10">10時
                                    </option><option value="11">11時
                                    </option><option value="12">12時
                                    </option><option value="13">13時
                                    </option><option value="14">14時
                                    </option><option value="15">15時
                                    </option><option value="16">16時
                                    </option><option value="17">17時
                                    </option><option value="18">18時
                                    </option><option value="19">19時
                                    </option><option value="20">20時
                                    </option><option value="21">21時
                                    </option><option value="22">22時
                                    </option><option value="23">23時
                                </option></select>


                            </td>
                        </tr>
                        <tr>
                            <td class="td9 top" align="left" width="200">
                                <input id="change_status" name="change_status" value="2" type="checkbox"><label for="change_status">掲載オン/オフを切り替える</label>
                            </td>
                            <td class="td4 border">

                                <input name="status" id="status1" value="1" type="radio"><label for="status1">オン</label>
                                <input name="status" id="status0" value="0" checked="checked" type="radio"><label for="status0">オフ</label>
                            </td>
                        </tr>
                        <tr>
                            <td class="td9 top" align="left" width="220">
                                <input id="change_maxcpc" name="change_maxcpc" value="2" type="checkbox"><label for="change_maxcpc">スポンサードサーチ入札額を変更する</label>
                            </td>
                            <td class="td4 border">
                                次の入札額に変更<input name="maxCpc" class="txBox" style="width: 35px;" type="text">
                            </td>
                        </tr>
                </tbody></table>

                <br>
            </div>
        </form>

    </body>
</html>